#define _CRT_SECURE_NO_WARNINGS 1
#include "Queue.h"
void Queue::Push(STDateType index)
{
	_pushst.Push(index);
}
void Queue::Pop()
{
	while (!_pushst.Empty())
	{
		_popst.Push( _pushst.Top());
		_pushst.Pop();
	}
	_popst.Pop();
	while (!_popst.Empty())
	{
		_pushst.Push(_popst.Top());
		_popst.Pop();
	}
}
STDateType Queue::Back()
{
	return _pushst.Top();
}
STDateType Queue::Front()
{
	while (!_pushst.Empty())
	{
		_popst.Push(_pushst.Top());
		_pushst.Pop();
	}
	STDateType index = _popst.Top();
	while (!_popst.Empty())
	{
		_pushst.Push(_popst.Top());
		_popst.Pop();
	}
	return index;
}
bool Queue::Empty()
{
	return _pushst.Empty();
}
int Queue::Size()
{
	return _pushst.Size();
}